<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:sys="clr-namespace:System;assembly=mscorlib"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <sys:String x:Key="AppTitle">MVVMT4 Sample</sys:String>

    <Color x:Key="BlackColor">Black</Color>
    <Color x:Key="AppTitleColor">White</Color>

    <Color x:Key="BackgroundColor">White</Color>
    <Color x:Key="ForegroundColor">Black</Color>

    <Color x:Key="ButtonForegroundColor">#FF000000</Color>
    <Color x:Key="ButtonFocusBorderColor">#FF707070</Color>
    
    <Color x:Key="HeaderColor">LightSteelBlue</Color>

    <SolidColorBrush x:Key="AppTitleBrush" Color="{StaticResource AppTitleColor}" />
    <SolidColorBrush x:Key="HeaderBrush" Color="{StaticResource HeaderColor}" />
    <SolidColorBrush x:Key="BackgroundBrush" Color="{StaticResource BackgroundColor}" />
    <SolidColorBrush x:Key="ForegroundBrush" Color="{StaticResource ForegroundColor}" />
    <SolidColorBrush x:Key="AppTitleBorderBrush" Color="{StaticResource BlackColor}" />

    <SolidColorBrush x:Key="ButtonForegroundBrush" Color="{StaticResource ButtonForegroundColor}" />
    
    <LinearGradientBrush x:Key="ItemsControlBackgroundBrush" StartPoint="0,0" EndPoint="0,1" Opacity="1">
        <GradientStop Color="#FFFFFFFF" Offset="0" />
        <GradientStop Color="#FFDDDDDD" Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="AppTitleBackgroundBrush" StartPoint="0,0" EndPoint="0,1" Opacity="1">
        <GradientStop Color="LightSteelBlue" Offset="0" />
        <GradientStop Color="SteelBlue" Offset="1" />
    </LinearGradientBrush>
    
    <DataTemplate x:Key="ItemsControlNavigationTemplate">
        <DataTemplate.Resources>
            <Storyboard x:Key="OnMouseEnter1">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Image1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.35"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Image1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.35"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="OnMouseLeave1">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Image1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Image1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </DataTemplate.Resources>
        <Button x:Name="Button1" Style="{StaticResource PathButton}" IsEnabled="{Binding Path=Value.IsEnabled}"
                Foreground="{StaticResource ButtonForegroundBrush}" Margin="5" 
                ToolTip="{Binding Path=Metadata.ToolTip}" 
                Command="{Binding ElementName=MainWindow, Path=DataContext.NavigateCommand}" CommandParameter="{Binding Path=Metadata.PageUrl}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Image x:Name="Image1" Grid.Row="0" Source="{Binding Path=Metadata.IconUrl}" Height="32" Width="32" Margin="0 0 0 5" RenderTransformOrigin="0.5,0.5">
                    <Image.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                        </TransformGroup>
                    </Image.RenderTransform>
                </Image>
                <TextBlock Foreground="{StaticResource ButtonForegroundBrush}" HorizontalAlignment="Center" Grid.Row="1" Text="{Binding Path=Metadata.Name}" />
            </Grid>
        </Button>
        <DataTemplate.Triggers>
            <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="Button1">
                <BeginStoryboard x:Name="OnMouseLeave1_BeginStoryboard" Storyboard="{StaticResource OnMouseLeave1}"/>
            </EventTrigger>
            <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="Button1">
                <BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
            </EventTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <DropShadowEffect x:Key="dropShadowStyle" Color="{StaticResource BlackColor}" ShadowDepth="2" BlurRadius="5" Direction="315" RenderingBias="Performance" />
    <DropShadowEffect x:Key="dropShadowStyleTwo" Color="{StaticResource BlackColor}" ShadowDepth="2" BlurRadius="2" Direction="315" RenderingBias="Performance" />

    <Style x:Key="H1" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="{StaticResource HeaderBrush}" />
        <Setter Property="Effect" Value="{StaticResource dropShadowStyleTwo}" />
    </Style>
    
</ResourceDictionary>